package com.wxx.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author wxx
 * @since 2019-05-14
 */
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户的唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户登录的账号
     */
    private String account;

    /**
     * 登录密码
     */
    private String passwd;

    /**
     * 用户的真实姓名
     */
    private String name;

    /**
     * 0表示女，1表示男
     */
    private Integer sex;

    /**
     * 电话号码
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 用户在线状态
     */
    @TableField("onlineState")
    private Integer onlineState;

    /**
     * 用户使用客户端的类型
     */
    @TableField("clientType")
    private Integer clientType;

    /**
     * 当前客户端使用app的版本号
     */
    @TableField("clientVersion")
    private Integer clientVersion;

    /**
     * 用户的昵称
     */
    private String nick;

    /**
     * 用户的地址
     */
    private String address;

    /**
     * 用户的头像
     */
    private String avatar;

    /**
     * 用户注册的时间
     */
    private LocalDateTime created;

    /**
     * 用户最后一次登录的时间
     */
    private String updated;

    /**
     * 用户签名
     */
    private String signature;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getOnlineState() {
        return onlineState;
    }

    public void setOnlineState(Integer onlineState) {
        this.onlineState = onlineState;
    }

    public Integer getClientType() {
        return clientType;
    }

    public void setClientType(Integer clientType) {
        this.clientType = clientType;
    }

    public Integer getClientVersion() {
        return clientVersion;
    }

    public void setClientVersion(Integer clientVersion) {
        this.clientVersion = clientVersion;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getCreated() {
        return created;
    }

    public void setCreated(LocalDateTime created) {
        this.created = created;
    }

    public String getUpdated() {
        return updated;
    }

    public void setUpdated(String updated) {
        this.updated = updated;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
        "id=" + id +
        ", account=" + account +
        ", passwd=" + passwd +
        ", name=" + name +
        ", sex=" + sex +
        ", phone=" + phone +
        ", email=" + email +
        ", onlineState=" + onlineState +
        ", clientType=" + clientType +
        ", clientVersion=" + clientVersion +
        ", nick=" + nick +
        ", address=" + address +
        ", avatar=" + avatar +
        ", created=" + created +
        ", updated=" + updated +
        ", signature=" + signature +
        "}";
    }
}
